import React, { useState, useEffect } from 'react';
import { Row, Col, Tabs, Table } from 'antd';
import PageEmpty from '@/components/PageEmpty';
const { TabPane } = Tabs;

const Difference = props => {
  const { data } = props;
  return (
    <div className="approve-box-content-paragraph">
      <div className="approve-box-content-paragraph-title">回款系数差异</div>
      <Tabs animated={false}>
        {data.map(element => (
          <TabPane tab={`VS ${element.name}`} key={element.key}>
            {element.data ? (
              <Table
                columns={element.data.columns}
                dataSource={element.data.dataList}
                size="middle"
                bordered
                pagination={false}
                scroll={{ x: element.data.unitSize * 80, y: 500 }}
              ></Table>
            ) : (
              <PageEmpty emptyTitle={`暂无${element.name}数据`} />
            )}
          </TabPane>
        ))}
      </Tabs>
    </div>
  );
};
export default Difference;
